<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Null</title>
</head>
<body>
	<h1>test</h1>
	<input type="number" name="num1" id="num1" value="" placeholder="请填写第一个数字"/><br>
	<input type="number" name="num2" id="num2" value="" placeholder="请填写第二个数字"/><br>
	<button id="sum">相加</button>
	<div>
		结果:<span id="result"></span>
	</div>
<script>
let d = new XMLHttpRequest();
d.open("GET", "new.wasm", true);
d.responseType = "arraybuffer";
d.onload = function(){
	Module.wasmBinary= d.response;
	var script = document.createElement('script');
	script.src = "./new.js";
	document.body.appendChild(script);
};

//let a = document.querySelector("#num1").value;
//let b = document.querySelector("#num2").value;
//let sum = a + b;
//let btn_sum = document.querySelector("#sum");
//btn_sum.onclick = function(){
//	document.querySelector("#result").textContent = sum;
//};
	</script>
</body>
</html>
